home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / shmem_add.z / shmem_add
Encoding:
Text File  |  2002-10-03  |  5.2 KB  |  65 lines

  1.  
  2. SHMEM_ADD(3)                                                   SHMEM_ADD(3)
  3.  
  4.  
  5. NNNNAAAAMMMMEEEE
  6.      sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____aaaadddddddd, sssshhhhmmmmeeeemmmm____iiiinnnntttt____aaaadddddddd, sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____aaaadddddddd, sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____aaaadddddddd,
  7.      sssshhhhmmmmeeeemmmm____lllloooonnnngggg____aaaadddddddd, sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____aaaadddddddd - Performs an atomic add operation
  8.      on a remote data object
  9.  
  10. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  11.      C or C++:
  12.  
  13.         ####iiiinnnncccclllluuuuddddeeee <<<<mmmmpppppppp////sssshhhhmmmmeeeemmmm....hhhh>>>>
  14.  
  15.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____aaaadddddddd((((sssshhhhoooorrrrtttt ****_t_a_r_g_e_t,,,,sssshhhhoooorrrrtttt _v_a_l_u_e,,,, iiiinnnntttt _p_e))));;;;
  16.  
  17.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____iiiinnnntttt____aaaadddddddd((((iiiinnnntttt ****_t_a_r_g_e_t,,,, iiiinnnntttt _v_a_l_u_e,,,, iiiinnnntttt _p_e))));;;;
  18.  
  19.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____lllloooonnnngggg____aaaadddddddd((((lllloooonnnngggg ****_t_a_r_g_e_t,,,, lllloooonnnngggg _v_a_l_u_e,,,, iiiinnnntttt _p_e))));;;;
  20.  
  21.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____aaaadddddddd((((lllloooonnnngggg lllloooonnnngggg ****_t_a_r_g_e_t,,,, lllloooonnnngggg lllloooonnnngggg _v_a_l_u_e,,,, iiiinnnntttt
  22.         _p_e);
  23.  
  24.      Fortran:
  25.  
  26.         IIIINNNNTTTTEEEEGGGGEEEERRRR _p_e
  27.  
  28.         CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT4444____AAAADDDDDDDD((((_t_a_r_g_e_t,,,, _v_a_l_u_e,,,, _p_e))))
  29.  
  30.         CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT8888____AAAADDDDDDDD((((_t_a_r_g_e_t,,,, _v_a_l_u_e,,,, _p_e))))
  31.  
  32. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  33.      The sssshhhhmmmmeeeemmmm____aaaadddddddd routine performs an atomic add operation.  It adds _v_a_l_u_e
  34.      to _t_a_r_g_e_t on Processing Element (PE) _p_e and atomically increments the
  35.      target without returning the value.  The arguments are as follows:
  36.  
  37.      _t_a_r_g_e_t    The remotely accessible integer data object to be updated on
  38.                the remote PE.  If you are using C/C++, the type of _t_a_r_g_e_t
  39.                should match that implied in the SYNOPSIS section.  If you
  40.                are using the Fortran compiler, it must be of type integer
  41.                with an element size of 4 bytes for SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT4444____AAAADDDDDDDD and 8
  42.                bytes for SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT8888____AAAADDDDDDDD.
  43.  
  44.      _v_a_l_u_e     The value to be atomically added to _t_a_r_g_e_t.  If you are
  45.                using C/C++, the type of value should match that implied in
  46.                the SYNOPSIS section.  If you are using Fortran, it must be
  47.                of type integer with an element size of _t_a_r_g_e_t.
  48.  
  49.      _p_e        An integer that indicates the PE number upon which _t_a_r_g_e_t is
  50.                to be updated.  If you are using Fortran, it must be a
  51.                default integer value.
  52.  
  53. NNNNOOOOTTTTEEEESSSS
  54.      The term _r_e_m_o_t_e_l_y _a_c_c_e_s_s_i_b_l_e is defined in iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm(3).
  55.  
  56.      The atomic add routines write directly into another PE's memory
  57.      without notifying that PE, so the receiving PE should use
  58.      sssshhhhmmmmeeeemmmm____sssseeeetttt____ccccaaaacccchhhheeee____iiiinnnnvvvv(3) or sssshhhhmmmmeeeemmmm____sssseeeetttt____ccccaaaacccchhhheeee____lllliiiinnnneeee____iiiinnnnvvvv(3) to set automatic
  59.      cache invalidation.  If this is not done, the receiving PE's data
  60.      cache might become incoherent.
  61.  
  62. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  63.      iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm(3), sssshhhhmmmmeeeemmmm____ccccaaaacccchhhheeee(3)
  64.  
  65.